package com.csp.mingyue.system.controller;

import com.csp.mingyue.common.core.vo.R;
import com.csp.mingyue.system.api.entity.SysOperateLog;
import com.csp.mingyue.system.service.SysOperateLogService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * <p>
 * 系统操作日志 前端控制器
 * </p>
 *
 * @author Strive
 * @since 2023-11-13 03:35:43
 */
@Tag(name = "系统操作日志模块")
@RestController
@RequestMapping("/sysOperateLog")
@RequiredArgsConstructor
public class SysOperateLogController {

	private final SysOperateLogService sysOperateLogService;

	@PostMapping("save")
	@Operation(summary = "保存系统操作日志")
	public R<Boolean> save(@Valid @RequestBody SysOperateLog dto) {
		return R.ok(sysOperateLogService.saveOperateLog(dto));
	}

}
